<?php
/*
|--------------------------------------------------------------------------
| 小程序路由接口
|--------------------------------------------------------------------------
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::domain(env('MINIAPP_DOMAIN'))
    ->middleware(['miniapp'])
    ->group(function ($routes) {

        //首页
        $routes->get('/', 'HomeController@index');
        $routes->post('/verify_mobile', 'HomeController@verify_mobile');  //验证手机号码
        $routes->post('/complain/add', 'HomeController@add_complain');
        $routes->post('/verify_mobile', 'HomeController@verify_mobile');

        $routes->get('/send_tpl_msg', 'HomeController@send_tpl_msg');
//        $routes->get('/group_mini_link', 'HomeController@group_mini_link'); //奖励联谊币信息
//        $routes->get('/group_mini_link_award', 'HomeController@group_mini_link_award'); //领取联谊币
//        $routes->get('/grab_red_packet', 'HomeController@grab_red_packet'); //拼手气领取联谊币

        //匹配推荐
        $routes->get('/pipei/index', 'PipeiController@index');
        $routes->get('/pipei/today', 'PipeiController@today'); //今日统计
        $routes->get('/pipei/check', 'PipeiController@check'); //检查今日是否有分配
        $routes->get('/pipei/history', 'PipeiController@history'); //查看最新三天的
        $routes->post('/pipei/recommend', 'PipeiController@recommend'); //今日匹配

        // 会员中心
        $routes->get('/member/ban', 'MemberController@ban');
        $routes->get('/member/qrcode', 'MemberController@qrcode');

//        $routes->post('/member/get_short_link', 'MemberController@get_short_link');

        $routes->get('/member/quick', 'MemberController@simple'); //简单信息

        $routes->get('/member/profile', 'MemberController@profile');
        $routes->get('/member/detail', 'MemberController@detail');
        $routes->get('/member/apply_fatie', 'MemberController@apply_fatie');

//        $routes->get('/member/apply_stage', 'MemberController@apply_stage');

        $routes->get('/member/set_field', 'MemberController@set_field');//设置字段
        $routes->get('/member/blacklist', 'MemberController@blacklist'); //屏蔽人
//        $routes->get('/member/fraud', 'MemberController@fraud'); //获取骗子列表
        $routes->get('/member/areas', 'MemberController@get_areas'); //获取区域
        $routes->get('/member/get_edit_data', 'MemberController@get_edit_init_data'); //获取详细编辑
        $routes->get('/member/short', 'MemberController@short_info'); //简短信息


        $routes->get('/member/recommend', 'MemberController@recommend'); //推广好友列表
        $routes->get('/member/my_stat', 'MemberController@my_stat'); //统计数据
        $routes->get('/subscribe/check', 'MemberController@check_subscribe'); //检测会员是否关注服务号
        $routes->get('/member/check_exist_wxqrcode', 'MemberController@check_exist_wxqrcode'); //检测会员微信二
        $routes->get('/member/check_is_subscribe', 'MemberController@check_is_subscribe'); //检测会员是否关注

//        $routes->get('/member/get_jump_group', 'MemberController@get_jump_group');
        $routes->post('/member/add_black', 'MemberController@add_black'); //加入黑名单
        $routes->post('/member/update_field', 'MemberController@update_field'); //编辑单个字段
        $routes->post('/member/update_gender', 'MemberController@update_gender'); //更新性别
        $routes->post('/member/update', 'MemberController@update');//更新数据
//        $routes->post('/member/apply_push', 'MemberController@apply_push');
//        $routes->post('/member/delete_push', 'MemberController@delete_push');//取消推送
        $routes->post('/member/upload', 'MemberController@upload'); //上传图片
//        $routes->post('/member/cancel', 'MemberController@cancel'); //注销账户
//        $routes->post('/member/delete_black', 'MemberController@delete_black'); //删除屏蔽
        $routes->post('/member/restore', 'MemberController@recover'); //恢复账号
        $routes->post('/member/delete_picture', 'MemberController@delete_picture'); //删除照片
        $routes->post('/member/auth_idcard', 'MemberController@auth_idcard'); //身份认证
        $routes->post('/member/auth_education', 'MemberController@auth_education'); //学历认证
        $routes->post('/member/edit_location', 'MemberController@edit_location'); //学历认证
        $routes->post('/member/withdraw', 'MemberController@withdraw'); //提现
        $routes->get('/member/quick_profile', 'MemberController@quick_profile');    //完善资料-快捷
        $routes->get('/member/model_fields', 'MemberController@model_fields');      //完善资料-弹窗字段
        $routes->post('/member/update_quick', 'MemberController@update_quick');     //完善资料-快捷-保存
        $routes->post('/member/save_lastvist', 'MemberController@save_lastvisit');  //保存最后访问记录
        $routes->post('/member/add_visit', 'MemberController@add_visit');           // 保存最近访客记录
        $routes->post('/member/open_visit', 'MemberController@open_visit');         // 解锁最近访客
        $routes->get('/member/visit_list', 'MemberController@visit_list');          // 访客记录列表
//        $routes->post('/member/del_visit', 'MemberController@del_visit');             // 删除最近访客
        $routes->post('/member/delete_account_record', 'MemberController@delete_account_record'); //删除账户变更记录

        $routes->get('/account/record', 'MemberController@account_record');
        $routes->get('/account/record/detail', 'MemberController@account_record_detail'); //获取账户详情
        $routes->get('/account/combo', 'MemberController@get_combo');//获取充值套餐
//        $routes->get('/member/chat', 'MemberController@chat');//获取聊天消息

        // 订单中心
        $routes->get('/order/recharge', 'OrderController@recharge');//充值
        $routes->get('/order/pay_param', 'OrderController@pay_param');//支付参数

        // 会员消息
        $routes->get('/message/list', 'MessageController@list');//消息列表
        $routes->get('/message/detail', 'MessageController@detail');//消息列表-详情
        $routes->get('/message/info', 'MessageController@info');//消息列表-详情
        $routes->get('/message/get_unread_amount', 'MessageController@get_unread_amount');//消息列表-未读数据条数
        $routes->post('/message/delete', 'MessageController@delete'); //删除

        //发动态
        $routes->get('/trend/list', 'TrendController@index'); //获取列表
        $routes->get('/trend/type', 'TrendController@talk_type'); //获取类型
        $routes->get('/trend/detail', 'TrendController@detail'); //详情

        $routes->get('/trend/like/member', 'TrendController@like_member'); //点赞人

        $routes->post('/trend/add', 'TrendController@add'); //新增动态
        $routes->post('/trend/like', 'TrendController@like');//点赞
        $routes->post('/trend/report', 'TrendController@report');//点赞

        //动态评论
        $routes->get('/trend/comment/list', 'TrendController@comment_list'); //获取评论列表
        $routes->post('/trend/comment/add', 'TrendController@add_comment');//添加评论
//        $routes->post('/trend/comment/member', 'TrendController@member');//添加评论

        // 应征
        $routes->get('/enlist/info', 'EnlistController@init_data');
        $routes->get('/enlist/my', 'EnlistController@my');
        $routes->get('/enlist/index', 'EnlistController@index');
        $routes->get('/enlist/member', 'EnlistController@member');
        $routes->get('/enlist/detail', 'EnlistController@detail');      //应征详情
        $routes->get('/enlist/enlistor', 'EnlistController@enlistor');  //应征我的
        $routes->get('/enlist/reapply', 'EnlistController@reapply');    //再次申请

        $routes->post('enlist/change_ablum', 'EnlistController@change_ablum'); //交换照片
//        $routes->post('/enlist/delete', 'EnlistController@delete');
        $routes->post('/enlist/add_super', 'EnlistController@add_super');//超级喜欢
//        $routes->post('/enlist/add_black', 'EnlistController@add_black');
//        $routes->post('/enlist/delete_black', 'EnlistController@delete_black');
        $routes->post('/enlist/refuse', 'EnlistController@refuse');//拒绝应征
        $routes->post('/enlist/confirm', 'EnlistController@confirm');//确认申请
        $routes->post('/enlist/accept', 'EnlistController@accept');//接受 拒绝
        $routes->post('/enlist/weixin', 'EnlistController@weixin');//获取微信

        //意见反馈
        $routes->post('/add_feed_back', 'HomeController@add_feed_back');//增加反馈类容
        $routes->post('/add_advice_reply_pic', 'HomeController@add_advice_reply_pic');//增加反馈回复图片
        $routes->get('/get_feed_back', 'HomeController@get_feed_back');//获取反馈类容
        $routes->get('/advice_reply', 'HomeController@advice_reply');//获取反馈类容
    });

// 可登陆或不登录
Route::domain(env('MINIAPP_DOMAIN'))
    ->middleware(['miniappno'])
    ->group(function ($routes) {

        $routes->get('/check_similar_college', 'HomeController@check_similar_college'); // 检查大学相似度
        $routes->get('/occupation_list', 'HomeController@occupation_list'); // 获取职业
        $routes->get('/profession_list', 'HomeController@profession_list'); // 获取专业
        $routes->get('/current_status', 'HomeController@current_status'); // 获取目前状态
        $routes->get('/advice/my', 'HomeController@advice_my'); // 我的意见反馈
        $routes->get('/upload', 'HomeController@upload'); // 上传文件

        // 接口文件 ToDo 待优化
        $routes->get('/auth/member', 'AuthController@get_member'); // 获取会员信息
        $routes->get('/auth/access_token', 'AuthController@access_token'); // 获取会员token
        $routes->get('/member/share', 'MemberController@share'); //个人分享

        $routes->get('/mini/share', 'HomeController@mini_share');
        $routes->get('/qrcode/detail', 'HomeController@qd_qrcode'); //渠道二维码
        $routes->get('/mini/share_list', 'HomeController@mini_share_list');

        //申请嘉宾
        $routes->get('/wearticle/list', 'WearticleController@list');  //嘉宾列表
        $routes->get('/activity/list', 'ActivityController@list');
        $routes->get('/get_similar_question', 'HomeController@get_similar_question'); // 相似问题
        $routes->post('/create_qrcode', 'HomeController@create_qr');
        $routes->get('/member/get_jump_info', 'MemberController@get_jump_info');

        $routes->get('/test/test', 'TestController@test');

        $routes->post('/wx_msg_response/index', 'WxMsgResponseController@index');  //小程序客服消息
    });

//登陆页面
Route::get('/config/detail', 'HomeController@config');
Route::post('/login', 'LoginController@index');
Route::get('/get_banner', 'HomeController@get_banner');  //获取banner值

// 注册
Route::post('/register', 'HomeController@register');

//验证码
Route::get('/captcha', 'LoginController@captcha');
Route::post('/notify/wx_notify', 'HomeController@wx_notify'); //支付异步通知

//退出系统
Route::get('/logout', 'LoginController@logout');
Route::get('/send_sms', 'HomeController@send_sms'); //发送短信

// 文章
Route::get('/content/list', 'ContentController@list');
Route::get('/content/detail', 'ContentController@detail');
Route::get('/member/get_jump', 'MemberController@get_jump'); // 获取二维码推广

Route::get('/cron/check_wx_qrcode', 'CronController@check_wx_qrcode');

Route::get('/tao', 'TestController@tao');